package com.zbkj.admin.controller;

import com.zbkj.admin.response.page.PageDiyResponse;
import com.zbkj.admin.result.CommonResult;
import com.zbkj.admin.service.PageDiyService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * 商户装修控制器
 *
 * @author Han
 * @version 1.0.0
 * @Date 2024/11/1
 */
@Slf4j
@RestController
@RequestMapping("api/front/merchant/page/diy")
@Tag(name = "商户装修控制器") //配合swagger使用
public class MerchantPageDiyFrontController {

    @Autowired
    private PageDiyService pageDiyService;

    @Operation(summary = "店铺装修详情")
    @RequestMapping(value = "/info/{merId}/{id}", method = RequestMethod.GET)
    public CommonResult<PageDiyResponse> info(@PathVariable(value = "merId") Integer merId, @PathVariable(value = "id", required = false) Integer id) {
        return CommonResult.success(pageDiyService.getMerchantPageDiyInfoByFront(merId, id));
    }

}
